home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / Snippets / Interapplication Communication / AECDEV⁄AEDAEMON / AECdev.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-09  |  2.2 KB  |  82 lines  |  [TEXT/MPS ]

  1. #include <Types.h>
  2. #include <Memory.h>
  3. #include <Quickdraw.h>
  4. #include <TextEdit.h>
  5. #include <Dialogs.h>
  6. #include <Devices.h>
  7. #include <Scrap.h>
  8. #include <menus.h> 
  9. #include <PPCToolbox.h>
  10. #include <AppleEvents.h>
  11. #include <StandardFile.h>
  12. #include <EPPC.h>
  13. #include <Aliases.h>
  14. #include <events.h>
  15. #include <gestaltequ.h>
  16. #include <ToolUtils.h>
  17.  
  18. /* Types */
  19. struct MyPPCRec {
  20. PPCParamBlockRec    pB;
  21. Ptr        buffer;        /* buffer we're using */
  22. Size bufferSize;    /* guess */
  23. Handle dataToXfer;
  24. PPCPortPtr myPort;
  25. PPCPortPtr buddyPortPtr;
  26. PPCPortRefNum ourPort;
  27. PPCSessRefNum currentSessionRef;
  28.  
  29. };
  30. typedef struct MyPPCRec MyPPCRec, *MyPPCRecPtr,**MyPPCRecHandle;
  31.  
  32.  
  33. typedef struct CDEVRec {
  34. Handle spare;
  35. MyPPCRecPtr myPPCBlock;
  36. /* LocationName won't be needed, since we're staying local */
  37. Boolean searchForTarget;  /* searchForTarget is our flag to tell us that we do not */
  38.                         /* know where AEBuddy is yet, and we have to keep looking. */
  39.                         /*  It also implies (if true) that PBCat has already been */
  40.                         /* called, if necessary */
  41. Boolean noBuddy;        /* PBCatSearch failed, give it up */
  42. Boolean notSys7;
  43. Boolean eventPending;
  44. } CDEVRec, *CDEVPtr, **CDEVHnd;
  45.  
  46.  
  47.  
  48.  
  49. struct MyPPCRecDeamon { /* to differenciact it from the one I'm using in teh CDEV */
  50. PPCParamBlockRec    pB;
  51. Ptr        buffer;        /* buffer we're using */
  52. Size bufferSize;    /* guess */
  53. Handle dataToXfer;
  54. PPCPortPtr myPort;
  55. PPCPortRefNum ourPort;
  56. PPCSessRefNum currentSessionRef;
  57.  
  58. };
  59. typedef struct MyPPCRecDeamon MyPPCRecDeamon, *MyPPCRecPtrDeamon,**MyPPCRecHandleDeamon;
  60. #define kOneK 1024
  61. #define kMyTypeOfData 'MAVT'
  62. #define kGenericCreator '????'
  63. #define kSendButton 1
  64. #define kNoBuddyAlert -4048
  65. #define kNot70 -4049
  66. #define kStringsID -4048
  67. #define kBrowse1 1
  68. #define kBrowse2 2
  69. #define kMyName 3
  70. #define kWatchCursor 4
  71.  
  72.  pascal Handle AECDEV(short message, short item, short numItems, short CPanelID, EventRecord *theEvent, Handle cdevStorage,
  73.                      DialogPtr CPDialog);
  74.  ControlHandle SnatchHandle(DialogPtr thebox, short theGetItem);
  75.  void FindATarget(CDEVHnd storage);
  76.  void FindAEBuddy(CDEVHnd storage);
  77.  void FireTheEvent(Handle packedEvent, CDEVHnd storage);
  78.  void OpenComplete(PPCStartPBPtr p);
  79.  void StartComplete(PPCWritePBPtr p);
  80.  void WriteComplete(PPCEndPBPtr p);
  81.  void EndComplete(PPCClosePBPtr p);
  82.